<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Dashboard extends MY_Controller {

	function __construct()
	{
		parent::__construct();
	}

	function index(){
		$this->build_menu();
		$this->load->view('dashboard', $this->data);
	}
	
	function build_menu(){
		$this->load->model('menu');
		$menu = $this->menu->get_base_menu();
		for($i=0;$i<count($menu);$i++){
			$menu[$i]['sub_menu'] = $this->menu->get_menu($menu[$i]['id_menu']);
		}
		$this->data['menus'] = $menu;
	}
}
?>
